$OpenBSD: patch-p0f_c,v 1.11 2013/08/15 14:58:45 naddy Exp $
--- p0f.c.orig	Mon Aug 21 16:16:00 2006
+++ p0f.c	Thu Aug 15 16:49:28 2013
@@ -36,12 +36,6 @@
 #include <pcap.h>
 #include <signal.h>
 
-#ifdef USE_BPF
-#include USE_BPF
-#else
-#include <pcap-bpf.h>
-#endif /* ^USE_BPF */
-
 #include <time.h>
 #include <ctype.h>
 
@@ -754,7 +748,7 @@ static _u8* lookup_link(_u16 mss,_u8 txt) {
 unknown:
 
   if (!txt) return 0;
-  sprintf(tmp,"unknown-%d",mss);
+  snprintf(tmp, sizeof(tmp), "unknown-%d",mss);
   return tmp;
 
 }
@@ -1642,13 +1636,13 @@ int main(int argc,char** argv) {
   load_config(config_file);
 
   if (argv[optind] && *(argv[optind])) {
-    sprintf(buf,"(%s) and (%.3000s)",use_rule,argv[optind]);
+    snprintf(buf, sizeof(buf), "(%s) and (%.3000s)",use_rule,argv[optind]);
     use_rule = buf;
   } 
 
   if (use_vlan) {
     _u8* x = strdup(use_rule);
-    sprintf(buf,"(%.1000s) or (vlan and (%.1000s))",x,x);
+    snprintf(buf, sizeof(buf), "(%.1000s) or (vlan and (%.1000s))",x,x);
     free(x);
     use_rule = buf;
   }
